package com.yang.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.stereotype.Component;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
@Table(name = "sys_field")
public class SysField {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;

    /**
     * 文件id
     */
    @Column(name = "sys_file_id")
    private Integer sysFileId;

    /**
     * 列数
     */
    @Column(name = "c_index")
    private Integer cIndex;

    /**
     * 列名
     */
    @Column(name = "c_name")
    private String cName;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    @Column(name = "create_time")
    private Date createTime;
}
